import axios from '@/utils/myaxios.js'

export const mylogin = (data) => {
  return axios({
    //登入接口
    url: '/login',
    method: 'post',
    data,
    // timeout: 10000
  })
}
export const myregister = (data) => {
  return axios({
    //注册接口
    url: '/register ',
    method: 'post',
    data,
    // timeout: 10000
  })
}
export const mypersonal = (data) => {
  return axios({
    //无效接口
    url: '/personal ',
    method: 'post',
    data,
    // timeout: 10000
  })
}
export const myuser = (id) => {
  return axios({
    //个人中心接口
    url: `/user/${id}`,
    method: 'get',
  })
}

export const post_comment = (id) => {
  return axios({
    //个人中心接口
    url: `/post_comment/${id}`,
    method: 'get',
  })
}


export const myprofile = (id, data) => {
  return axios({
    //编辑个人信息接口
    url: `/user_update/${id}`,
    method: 'post',
    data
  })
}
export const get_comment = (id, data) => {
  return axios({
    //发布评论接口
    url: `/post_comment/${id}`,
    method: 'post',
    data
  })
}

